/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import Model.TradCateg;
import org.hibernate.Session;
import org.hibernate.SessionFactory;


/**
 *
 * @author Anthares
 */
class TradCategManager extends BaseManager{

    public TradCategManager(SessionFactory factory, String locale) {
        super(factory, locale);
    }

    TradCateg getTradCategByID(int id) {
        Session session = factory.openSession();
        TradCateg trad = (TradCateg) session.getNamedQuery("TradCateg.findById").setInteger("categId", id).setString("langId", locale).uniqueResult();
        session.close();
        return trad;
    }
    
}
